use aqua::server::prelude::*;
use studman::route::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    utils::init_logger();

    let server = Server::new();
    server
        .mount(router!(index))
        .mount(router!(query_student))
        .mount(router!(add_student))
        .mount(router!(all_students))
        .run("127.0.0.1:7878").await?;

    Ok(())
}